
import { request } from "./request";
import { encryptReq } from '../utils/apiSecure'
import qs from 'qs'

export function showSession(){
    return request({
        url:'/anon/showSession',
        method: 'post',
        params: encryptReq('777777777')
    })
}

export function exchangeKey(key){
    return request({
        url:'/anon/exchangeKey',
        method:'post',
        data:key,
    })
}

export function GM(data,t){
    return request({
        url:'/algo/GM/arr',
        method:'post',
        params:{
            arr:data,
            t:t
        },
        paramsSerializer:params => {
            return qs.stringify(params, {indices:false})
        }
    })
}

export function getTemplate(){
    return request({
        url:'/algo/getTemplate',
        responseType: 'blob'
    })
}